cmake_minimum_required(VERSION 3.14)
project(MyProject)

# 设置 C++ 标准为 C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 设置变量
set(GTEST_INCLUDE "/home/gtestpro/gtest")
set(GTEST_LIB "/home/gtestpro/lib")
set(TARGET "hello_test")
# 添加可执行文件
add_executable(${TARGET} hello_test.cpp)

# 添加 Google Test 的头文件路径
target_include_directories(${TARGET} PRIVATE ${GTEST_INCLUDE})

# 链接 Google Test 库和 pthread 库
target_link_libraries(${TARGET} gtest gtest_main pthread)
